package com.backstage.controller;

import com.backstage.entity.AjaxResult;

public class BaseController {

	protected String loginSuccess="登陆成功，正在跳转......";
	
	public AjaxResult success() {
		return new AjaxResult(true);
	}
	
	public AjaxResult success(String message) {
		return new AjaxResult(true, message);
	}
	public AjaxResult success(String message, Object data) {
		return new AjaxResult(true, message, data);
	}
	
	public AjaxResult fail() {
		return new AjaxResult(false);
	}
	
	public AjaxResult fail(String message) {
		return new AjaxResult(false, message);
	}
	
	public AjaxResult fail(Integer errorCode) {
		return new AjaxResult(false, errorCode);
	}
	
	public AjaxResult json(Object data) {
		return new AjaxResult(true, data);
	}
	
	public AjaxResult json(String message, Object data) {
		return new AjaxResult(true, message, data);
	}
}
